package com.ruoyi.system.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.MyKernelUserEqu;
import com.ruoyi.system.mapper.MyUserEquMapper;
import com.ruoyi.system.service.ISysUserEquService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service
public class ISysUserEquServiceImpl implements ISysUserEquService {

    @Autowired
    private MyUserEquMapper myUserEquMapper;

    @Override
    public int insertKernelUserEqu(MyKernelUserEqu myKernelUserEqu) {
        myKernelUserEqu.setCreateTime(DateUtils.getNowDate());
        return myUserEquMapper.insertKernelUserEqu(myKernelUserEqu);
    }

    @Override
    public List<MyKernelUserEqu> selectKernelUserEquList(MyKernelUserEqu myKernelUserEqu) {
        List<MyKernelUserEqu> equList = myUserEquMapper.selectKernelUserEquList(myKernelUserEqu);
        return equList;
    }

    @Override
    public int updateCurEqu(String saleNel, String snCode) {
       int t = myUserEquMapper.updateCurEqu(saleNel,snCode);
        return t;
    }

    @Override
    public List<Map<String, Object>> selectKernelEquList(MyKernelUserEqu userEqu) {
        List<Map<String, Object>> mlist = myUserEquMapper.selectKernelEquList(userEqu);
        return mlist;
    }
}
